.class public Lcom/xingbook/park/activity/VideoPlayWebActivity;
.super Lcom/xingbook/park/activity/BaseActivity;


# instance fields
.field private a:Lcom/xingbook/b/n;

.field private b:Landroid/webkit/WebView;

.field private c:Ljava/lang/String;

.field private d:J

.field private e:I


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lcom/xingbook/park/activity/BaseActivity;-><init>()V

    const/4 v0, -0x1

    iput v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->e:I

    return-void
.end method

.method static synthetic a(Lcom/xingbook/park/activity/VideoPlayWebActivity;)Landroid/webkit/WebView;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    return-object v0
.end method

.method public static a(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)V
    .locals 3

    const/4 v2, 0x6

    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/xingbook/park/activity/VideoPlayWebActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "com.xingbook.park.activity.VideoPlayWebActivity.INTENT_RESTYPE"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v1, "com.xingbook.park.activity.VideoPlayWebActivity.INTENT_ID"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v1, "com.xingbook.park.activity.VideoPlayWebActivity.INTENT_NAME"

    invoke-virtual {v0, v1, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    instance-of v1, p0, Landroid/app/Activity;

    if-nez v1, :cond_0

    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    :cond_0
    instance-of v1, p0, Lcom/xingbook/park/activity/BaseActivity;

    if-eqz v1, :cond_1

    check-cast p0, Lcom/xingbook/park/activity/BaseActivity;

    invoke-virtual {p0, v0, v2}, Lcom/xingbook/park/activity/BaseActivity;->a(Landroid/content/Intent;I)V

    :goto_0
    return-void

    :cond_1
    instance-of v1, p0, Lcom/xingbook/park/activity/BaseFragmentActivity;

    if-eqz v1, :cond_2

    check-cast p0, Lcom/xingbook/park/activity/BaseFragmentActivity;

    invoke-virtual {p0, v0, v2}, Lcom/xingbook/park/activity/BaseFragmentActivity;->a(Landroid/content/Intent;I)V

    goto :goto_0

    :cond_2
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_0
.end method

.method private a(Ljava/lang/String;)V
    .locals 2

    iput-object p1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->c:Ljava/lang/String;

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->a:Lcom/xingbook/b/n;

    invoke-virtual {v0}, Lcom/xingbook/b/n;->s()I

    move-result v0

    iput v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->e:I

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->d:J

    return-void
.end method

.method private b()V
    .locals 6

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->c:Ljava/lang/String;

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->e:I

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->c:Ljava/lang/String;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    iget-wide v4, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->d:J

    sub-long/2addr v2, v4

    long-to-int v2, v2

    const/4 v3, 0x1

    invoke-static {v0, v1, v2, v3}, Lcom/xingbook/park/d/j;->a(ILjava/lang/String;IZ)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->c:Ljava/lang/String;

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->d:J

    const/4 v0, -0x1

    iput v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->e:I

    :cond_0
    return-void
.end method


# virtual methods
.method public a()V
    .locals 4

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->a:Lcom/xingbook/b/n;

    invoke-virtual {v0}, Lcom/xingbook/b/n;->f()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    const-string v1, "<!DOCTYPE html><html><head><meta charset=\"utf-8\"/><title>\u51fa\u9519\u4e86</title></head><body><p>\u60a8\u6b63\u5728\u8bbf\u95ee\u9519\u8bef\u7684\u5185\u5bb9</p></body><html>"

    const-string v2, "text/html; charset=UTF-8"

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v2, v3}, Landroid/webkit/WebView;->loadData(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :goto_0
    return-void

    :cond_0
    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v1, v0}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public e()Ljava/lang/String;
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "\u661f\u5b9d\u5f71\u9662-\u7f51\u9875\u64ad\u653e"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 6
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "SetJavaScriptEnabled"
        }
    .end annotation

    const/4 v5, 0x1

    const/4 v4, -0x1

    invoke-super {p0, p1}, Lcom/xingbook/park/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    new-instance v1, Lcom/xingbook/b/k;

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "com.xingbook.park.activity.VideoPlayWebActivity.INTENT_RESTYPE"

    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v2

    invoke-direct {v1, v2}, Lcom/xingbook/b/k;-><init>(I)V

    iput-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->a:Lcom/xingbook/b/n;

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->a:Lcom/xingbook/b/n;

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "com.xingbook.park.activity.VideoPlayWebActivity.INTENT_ID"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/xingbook/b/n;->a(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->a:Lcom/xingbook/b/n;

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "com.xingbook.park.activity.VideoPlayWebActivity.INTENT_NAME"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/xingbook/b/n;->b(Ljava/lang/String;)V

    new-instance v1, Landroid/webkit/WebView;

    invoke-direct {v1, p0}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    new-instance v2, Lcom/xingbook/park/activity/cu;

    invoke-direct {v2, p0}, Lcom/xingbook/park/activity/cu;-><init>(Lcom/xingbook/park/activity/VideoPlayWebActivity;)V

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    invoke-virtual {v1, v5}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    invoke-virtual {v1, v4}, Landroid/webkit/WebSettings;->setCacheMode(I)V

    invoke-virtual {v1, v5}, Landroid/webkit/WebSettings;->setAppCacheEnabled(Z)V

    sget-object v2, Lcom/xingbook/c/c;->G:Ljava/lang/String;

    invoke-virtual {v1, v2}, Landroid/webkit/WebSettings;->setAppCachePath(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    new-instance v2, Landroid/webkit/WebChromeClient;

    invoke-direct {v2}, Landroid/webkit/WebChromeClient;-><init>()V

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->setWebChromeClient(Landroid/webkit/WebChromeClient;)V

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {p0, v1}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->setContentView(Landroid/view/View;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->a()V

    const-string v1, "com.xingbook.park.activity.VideoPlayWebActivity.INTENT_ID"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->a(Ljava/lang/String;)V

    return-void
.end method

.method protected onDestroy()V
    .locals 2

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->stopLoading()V

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    if-eqz v0, :cond_0

    instance-of v1, v0, Landroid/view/ViewGroup;

    if-eqz v1, :cond_0

    check-cast v0, Landroid/view/ViewGroup;

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    :cond_0
    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->destroy()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    invoke-direct {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b()V

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onDestroy()V

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method protected onPause()V
    .locals 3

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->pauseTimers()V

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    const-string v1, "onPause"

    const/4 v2, 0x0

    new-array v2, v2, [Ljava/lang/Class;

    invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_2
    .catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_3

    :goto_0
    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onPause()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onPause(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->b(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->a(Landroid/content/Context;)V

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    goto :goto_0

    :catch_2
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->printStackTrace()V

    goto :goto_0

    :catch_3
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/NoSuchMethodException;->printStackTrace()V

    goto :goto_0
.end method

.method protected onResume()V
    .locals 3

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->resumeTimers()V

    iget-object v0, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    const-string v1, "onResume"

    const/4 v2, 0x0

    new-array v2, v2, [Ljava/lang/Class;

    invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/park/activity/VideoPlayWebActivity;->b:Landroid/webkit/WebView;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_2
    .catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_3

    :goto_0
    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onResume()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onResume(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VideoPlayWebActivity;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->a(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->b(Landroid/content/Context;)V

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    goto :goto_0

    :catch_2
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->printStackTrace()V

    goto :goto_0

    :catch_3
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/NoSuchMethodException;->printStackTrace()V

    goto :goto_0
.end method
